#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <pthread.h>

#include "common.h"

#include "ar.h"
#include "extractor.h"

static AR *ar;

bool extractor_init(const char *filename, const char *destdir, const AROptions *options)
{
    ar = ar_init_extractor(filename, destdir, options);
    return ar != NULL;
}

void extractor_deinit(void)
{
    /* no-op */
}

void extractor_run(void)
{
    ar_decompress_archive(ar);
    ar_end_extracting(ar);
}
